package com.bawei.detail.model

import com.bawei.common.entity.CommendEntity
import com.bawei.detail.api.DetailServerApi
import com.bawei.detail.entity.AuthorEntity
import com.bawei.detail.entity.DanmuEntity
import com.bawei.network.BaseResponse
import javax.inject.Inject

/**
 * Author: Jason Zhang
 * Date: 2025/2/11
 * Desc:
 */
class DetailRepository @Inject constructor(private val apiServerApi: DetailServerApi) {

    suspend fun getAuthorInfoById(userId: String): BaseResponse<AuthorEntity>{
        return apiServerApi.getAuthorById(userId)
    }

    suspend fun getMovieCommendById(dataType: Int, itemId: String): BaseResponse<List<CommendEntity>>{
        return apiServerApi.getCommentByUserId(dataType, itemId)
    }
    //20250215 游戏鸿蒙-i视频-10-性能升级-多版本兼容 发送弹幕
    suspend fun publishDanmuMsg(entity: DanmuEntity): BaseResponse<DanmuEntity>{
        return apiServerApi.publishDanmuMsg(entity)
    }
    //20250215 游戏鸿蒙-i视频-10-性能升级-多版本兼容 获取历史弹幕
    suspend fun getBulletScreenInfo(dataType: Int, itemId: String): BaseResponse<List<DanmuEntity>>{
        return apiServerApi.getBulletScreenInfo(dataType, itemId)
    }


}